Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: insight filters and UI not in sync #17868

Closed
wants to merge 7 commits into from
Closed

Conversation

daibhin
Copy link
Contributor

@daibhin daibhin commented Oct 9, 2023

Problem

Right now the filters shown in the header of an insight are not editable in a notebook. This means that there is no way to update the time range of a query.

Screenshot 2023-10-11 at 16 49 06

Changes

  • Add the view prop to show the filters, but in the settings component not the insight.
  • Add custom CSS to remove extra padding & add a margin to other settings

Note: Sacrificing the title above the display filters because that would mean adding an entirely separate Query component which I'm not sure is worth the extra complexity until we're certain this is how insight editing will look going forward

There is a bug with this implementation that means the query is never updated. There is an internal hook in setQuery that is not being called somewhere

Mismatch.video.mp4

How did you test this code?

Visually

@daibhin daibhin marked this pull request as ready for review October 11, 2023 16:19
@daibhin daibhin requested a review from a team October 12, 2023 10:41
Copy link
Member

@Twixes Twixes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good, but this grouping of options is quite dubious:
Screenshot 2023-10-12 at 16 19 35
The time range etc. settings look as if they belonged to "Sampling". Their layout and that of the existing query definition settings are from different worlds.
In these PostHog 3000 mocks from Cory, he proposed putting the options inside the "widget", just at the bottom to take away the clutter from the top.
Screenshot 2023-10-12 at 16 25 01
That's one way to do it. The other is that we can put them in the side panel, ideally at the top or sticky at the bottom – but with the same layout (headings and all) as all the other settings.

@benjackwhite
Copy link
Contributor

@Twixes I think this should be the "lets get it working" solution for now and we tackle the proper solution in a way that works everywhere. Otherwise we will get stuck

@Twixes
Copy link
Member

Twixes commented Oct 12, 2023

Yeah yeah @benjackwhite that's a comment but not a blocker.

@posthog-bot
Copy link
Contributor

This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in another week.

@posthog-bot
Copy link
Contributor

This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in another week.

@daibhin daibhin removed the stale label Nov 1, 2023
@daibhin
Copy link
Contributor Author

daibhin commented Nov 1, 2023

Still working on this but just blocked by the Product Analytics work to fix queries (coming next week)

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Contributor

This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in another week.

@posthog-bot
Copy link
Contributor

This PR was closed due to lack of activity. Feel free to reopen if it's still relevant.

@daibhin daibhin deleted the dn-fix/insight-filters branch March 15, 2024 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants